package user

import (
	"gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/dao/schema"
)

const TableNameUserWallet = "user_wallet"

// UserWallet 用户钱包
type UserWallet struct {
	schema.Model
	UserId        int64   `gorm:"type:bigint;not null;comment:用户ID"`
	Balance       float64 `gorm:"type:decimal(20,4);not null;default:0;comment:用户余额"`
	Version       int64   `gorm:"type:bigint;not null;comment:乐观锁"`
	ValidConsume  float64 `gorm:"type:decimal(20,4);not null;default:0;comment:用户有效消耗量"`
	ValidMark     float64 `gorm:"type:decimal(20,4);not null;default:0;comment:用户打码量"`
	TotalRecharge float64 `gorm:"type:decimal(20,4);not null;default:0;comment:用户总充值"`
	TotalWithdraw float64 `gorm:"type:decimal(20,4);not null;default:0;comment:用户总提现"`
}

func (*UserWallet) TableName() string {
	return TableNameUserWallet
}
